<?php

/*
 * Object/Project.php
 */

namespace Ticket\Model\Object;

/**
 * Projets
 */
class Project extends XObject {

    public $id;
    public $libelle;
    public $description;
    public $plateforme;
    public $framework;
    public $debut;
    public $fin;
    public $etat;

    /**
     * Constructeur
     * 
     * @param array $data
     */
    public function __construct($data = array()) {
        $this->exchangeArray($data);
    }

    /**
     * Remplissage des données
     * 
     * @param array $data
     */
    public function exchangeArray($data) {
        $this->id          = isset($data['id']) ? (int) $data['id'] : null;
        $this->libelle     = isset($data['libelle']) ? $data['libelle'] : '';
        $this->description = isset($data['description']) ? $data['description'] : '';
        $this->plateforme  = isset($data['plateforme']) ? $data['plateforme'] : 'PHP';
        $this->framework   = isset($data['framework']) ? $data['framework'] : '';
        $this->debut       = isset($data['debut']) ? $data['debut'] : '0000-00-00';
        $this->fin         = isset($data['fin']) ? $data['fin'] : '0000-00-00';
        $this->etat        = isset($data['etat']) ? (int) $data['etat'] : '0';
    }

}
